package com.da.javatest.leetCode;

import java.util.Arrays;

/**
 * @author chenlida
 * @date 2019/1/15 17:36
 * @description
 */
public class Code453 {
    public int minMoves(int[] nums) {
        int total = 0;
        for (int num : nums) {
            total += num;
        }
        Arrays.sort(nums);
        return total - nums[0] * nums.length;
    }
}
